home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Pascal / Games / Stella Obscura 1.1 / source / Parts ƒ / gamePlay.p < prev    next >
Encoding:
Text File  |  1990-05-13  |  2.3 KB  |  110 lines  |  [TEXT/PJMM]

  1. unit gamePlay;
  2.  
  3. interface
  4.  
  5.     procedure D_gamePlay;
  6.  
  7. implementation
  8.  
  9.     const
  10.         I_Okay = 1;
  11.         I_Static_Text = 2;
  12.         I_Static_Text3 = 3;
  13.         I_Static_Text5 = 4;
  14.         I_Static_Text7 = 5;
  15.         I_Static_Text9 = 6;
  16.         I_Static_Text11 = 7;
  17.         I_Static_Text13 = 8;
  18.         I_Static_Text15 = 9;
  19.         I_Static_Text17 = 10;
  20.         I_Static_Text19 = 11;
  21.         I_Static_Text21 = 12;
  22.         I_Static_Text23 = 13;
  23.         I_Static_Text25 = 14;
  24.         I_Static_Text27 = 15;
  25.         I_Static_Text29 = 16;
  26.         I_Static_Text31 = 17;
  27.         I_Static_Text33 = 18;
  28.         I_Picturex35 = 19;
  29.     var
  30.         ExitDialog: boolean;
  31.  
  32. {===========================================================}
  33.  
  34.     function MyFilter (theDialog: DialogPtr; var theEvent: EventRecord; var itemHit: integer): boolean;
  35.         var
  36.             DoubleClick: boolean;
  37.             MyPt: Point;
  38.             tempRect: Rect;
  39.     begin
  40.         MyFilter := FALSE;
  41.         if (theEvent.what = MouseDown) then
  42.             begin
  43.                 MyPt := theEvent.where;
  44.                 with theDialog^.portBits.bounds do
  45.                     begin
  46.                         myPt.h := myPt.h + left;
  47.                         myPt.v := myPt.v + top;
  48.                     end;
  49.             end;
  50.     end;
  51.  
  52. {===========================================================}
  53.  
  54.     procedure D_gamePlay;
  55.         var
  56.             GetSelection: DialogPtr;
  57.             tempRect: Rect;
  58.             DType: Integer;
  59.             Index: Integer;
  60.             DItem: Handle;
  61.             CItem, CTempItem: controlhandle;
  62.             sTemp: Str255;
  63.             itemHit: Integer;
  64.             temp: Integer;
  65.             Icon_Handle: Handle;
  66.             NewMouse: Point;
  67.             InIcon: boolean;
  68.             ThisEditText: TEHandle;
  69.             TheDialogPtr: DialogPeek;
  70.         procedure Refresh_Dialog;
  71.             var
  72.                 rTempRect: Rect;
  73.         begin
  74.         end;
  75.  
  76.     begin
  77.         GetSelection := GetNewDialog(6, nil, Pointer(-1));
  78.         ShowWindow(GetSelection);
  79.         SelectWindow(GetSelection);
  80.         SetPort(GetSelection);
  81.         TheDialogPtr := DialogPeek(GetSelection);
  82.         ThisEditText := TheDialogPtr^.textH;
  83.         HLock(Handle(ThisEditText));
  84.         ThisEditText^^.txSize := 9;
  85.         TextSize(9);
  86.         ThisEditText^^.txFont := geneva;
  87.         TextFont(geneva);
  88.         ThisEditText^^.txFont := 3;
  89.         ThisEditText^^.fontAscent := 10;
  90.         ThisEditText^^.lineHeight := 10 + 2 + 0;
  91.         HUnLock(Handle(ThisEditText));
  92.         ExitDialog := FALSE;
  93.         repeat
  94.             ModalDialog(nil, itemHit);
  95.             GetDItem(GetSelection, itemHit, DType, DItem, tempRect);
  96.             CItem := Pointer(DItem);
  97.             if (ItemHit = I_Okay) then
  98.                 begin
  99.                     ExitDialog := TRUE;
  100.                     Refresh_Dialog;
  101.                 end;
  102.             if (ItemHit = I_Picturex35) then
  103.                 begin
  104.                 end;
  105.         until ExitDialog;
  106.         DisposDialog(GetSelection);
  107.     end;
  108.  
  109. end.                                    {End of unit}
  110.